package com.cx.contentcenter.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Author: ThinkPad
 * @Creation: 2021/9/9 15:49
 * @Desc: 注入RestTemplate
 */
//@Configuration
public class HttpConfig {

    @Bean
    @LoadBalanced //启用Ribbon负载均衡
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
